# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name：     day155_pyqt5_qPixmap
   Description :
   Author :       fuml
   date：          2019/9/22
-------------------------------------------------
   Change Activity:
                   2019/9/22:This example shows text which
is entered in a QLineEdit in a QLabel widget.
-------------------------------------------------
"""
import  sys
from PyQt5.QtWidgets import QWidget,QHBoxLayout,QLabel,QApplication,QLineEdit
from PyQt5.QtGui import QPixmap

class Example(QWidget):
    def __init__(self):
        super().__init__()

        self.initUI()

    def initUI(self):
        self.lbl =QLabel(self)
        qle =QLineEdit(self)

        qle.move(60,100)
        self.lbl.move(60,40)

        qle.textChanged[str].connect(self.onChange)

        self.setGeometry(300,300,280,170)
        self.setWindowTitle('QLineEdit')
        self.show()

    def onChange(self,text):
        self.lbl.setText(text)
        self.lbl.adjustSize()

if __name__ == '__main__':
    app =QApplication(sys.argv)
    ex = Example()
    sys.exit(app.exec_())


